package com.hsq.androidproject.ui.fragment;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.hsq.androidproject.ui.MainActivity;

/**
 * Created by lenovo on 2017/3/2.
 */

public class BaseFragment extends Fragment {
    protected MainActivity activity;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activity = (MainActivity) getActivity();
    }

    protected void intent2Activity(Class<? extends Activity> clazz) {
        Intent intent = new Intent(activity, clazz);
        startActivity(intent);
    }
}